package cc.taofoo.Design.assignment1;

public class Nvwa {
    public static enum TYPE {W, M, R};

    public static Person createPerson(TYPE type) {
        Person person = null;
        switch (type) {
            case W:
                person = new Woman();
                break;
            case M:
                person = new Man();
                break;
            case R:
                person = new Robot();
                break;
        }

        return person;
    }

}
